import { createModal } from './modal'
import { showMsgBox, showConfirm } from './msgBox'
import type { ConfirmOptions, MsgBoxOptions } from './msgBox/types'
import { createLoadingScreen } from './loading'

export const modal = {
  create: createModal,
  loadingScreen: createLoadingScreen,
  message: showMsgBox,
  info: (opts: MsgBoxOptions) => showMsgBox(opts, 'info'),
  success: (opts: MsgBoxOptions) => showMsgBox(opts, 'success'),
  warn: (opts: MsgBoxOptions) => showMsgBox(opts, 'warn'),
  error: (opts: MsgBoxOptions) => showMsgBox(opts, 'error'),
  confirm: (opts: ConfirmOptions) => showConfirm(opts)
}
